/**
 * Created by abc on 2017/12/23.
 */
;(function($){

    this.tools = function(){


        var runShowImg = function (imgs,time) {//imgs：页面图片获取的jQuery对象，轮播间隔时间
            var i = 0;
            setInterval(function(){
                if(i>=imgs.length-1) i=-1;
                else	   imgs.fadeOut(1000).eq(++i).fadeIn(1500);
            },time);
        }

        return{
            runImg:function(imgs,time){
                return runShowImg(imgs,time);
            }
        }
    }();

})(jQuery);